package day5.gui;

import javax.swing.JCheckBox;
import javax.swing.JFrame;
import javax.swing.JPanel;

public class TestJCheckBox extends JFrame {
	public TestJCheckBox(String title) {
		this.setTitle(title);
		this.setSize(400, 500);
		this.setLocationRelativeTo(null);
		this.setResizable(false);
		this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		this.setVisible(true);
		//复选框
		JCheckBox box1 = new JCheckBox("white");
		JCheckBox box2 = new JCheckBox("五五开");
		JCheckBox box3 = new JCheckBox("卢本伟");
		JPanel p = new JPanel();
		p.add(box1);
		p.add(box2);
		p.add(box3);
		
		this.add(p);
		
	}
	public static void main(String[] args) {
		new TestJCheckBox("复选框");
	}

}
